package com.shlh.saas.service.company;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shlh.saas.entity.company.Company;
import com.shlh.saas.entity.company.GlobalEnterpriseEs;
import com.shlh.saas.entity.twitter.TwitterUserEs;
import com.shlh.saas.model.dto.TwitterQueryDTO;

import java.util.List;
import java.util.Map;

public interface GlobalEnterpriseEsService {

    /**
     * 分页查询全球企业列表
     *
     * @param globalEnterpriseEs 查询条件
     * @return 分页结果
     */
    Page<GlobalEnterpriseEs> queryGlobalEnterpriseList(GlobalEnterpriseEs globalEnterpriseEs);

    /**
     * 统计全球企业数量
     * @param globalEnterpriseEs
     * @return
     */
    long countGlobalEnterprise(GlobalEnterpriseEs globalEnterpriseEs);

    /**
     * 获取ES查询结果总数（用于导出前的数量预估）
     *
     * @param globalEnterpriseEs 查询条件DTO
     * @return 匹配记录总数
     */
    long countForExport(GlobalEnterpriseEs globalEnterpriseEs);

    List<GlobalEnterpriseEs> searchGlobalEnterpriseByEmail(String searchKeyword, int offset, int size);

    Long countGlobalEnterpriseByEmail(String searchKeyword);

    List<GlobalEnterpriseEs> searchCompaniesWithPhone(String searchKeyword, int offset, int size);

    Long countCompaniesWithPhone(String searchKeyword);

    List<Map<String, String>> searchGlobalEnterpriseWithEmail(String email, int limit);

    List<Map<String, String>> searchGlobalEnterpriseWithPhone(String phone, int limit);

    List<Map<String, String>> findGlobalEnterpriseByEmail(String value, int offset, int size);

    List<Map<String, String>> findGlobalEnterpriseByPhone(String value, int offset, int size);

    List<Map<String, String>> findGlobalEnterpriseByDomain(String domain, int size, int offset);

    List<String> searchCities(String cities);

    List<String> searchIndustries(String industry);

    List<String> searchOccupations(String occupations);

    List<String> searchDepartments(String departments);


    List<GlobalEnterpriseEs> searchCompanyDataByPhone(String companyName, String fullName, String website);

    List<GlobalEnterpriseEs> searchCompanyDataByEmail(String companyName, String fullName, String website);


}
